package parts10.lesson147;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Demo {
    public static void main(String[] args) throws Exception {
        Map<Integer,String > map=new HashMap<Integer, String>();
        map.put(1,"hello");
        map.put(2,"world");
        Set<Map.Entry<Integer,String >> set= map.entrySet();
        Iterator<Map.Entry<Integer,String >> iter=set.iterator();
        while (iter.hasNext()){
            Map.Entry<Integer,String > me=iter.next();

            System.out.println(iter.next());
            System.out.println(me.getKey()+"+++++"+me.getValue());
        }
    }
}
